package Inheritance;

import java.util.Objects;

public class LaoShi {
    private String name;
    private Integer age;
    private Integer id;



    public LaoShi() {
    }

    public LaoShi(String name, int age, int id) {
        this.name = name;
        this.age = age;
        this.id = id;
    }

    @Override
    public boolean equals(Object obj) {
        LaoShi laoShi = (LaoShi) obj;
        return laoShi.getAge()==this.getAge()&&laoShi.getId()==this.getId()&&laoShi.getName().equals(this.getName());
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
}
